.class Lcom/netease/newsreader/activity/SettingsActivity$1;
.super Landroid/os/Handler;
.source "SettingsActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/SettingsActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/SettingsActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/SettingsActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    .line 210
    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 6
    .parameter "msg"

    .prologue
    const v4, 0x7f0b0075

    const/4 v5, 0x0

    .line 215
    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    .line 216
    iget v2, p1, Landroid/os/Message;->what:I

    packed-switch v2, :pswitch_data_0

    .line 253
    :cond_0
    :goto_0
    return-void

    .line 218
    :pswitch_0
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    const-string v3, "cache"

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/activity/SettingsActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    .line 219
    .local v1, p:Landroid/preference/Preference;
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-virtual {v3, v4}, Lcom/netease/newsreader/activity/SettingsActivity;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 220
    const-string v3, ",\u5f53\u524d\u7f13\u5b58\u5927\u5c0f\u4e3a0K"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 219
    invoke-virtual {v1, v2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 226
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-static {v2}, Lcom/netease/newsreader/activity/SettingsActivity;->access$0(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/app/ProgressDialog;

    move-result-object v2

    invoke-virtual {v2}, Landroid/app/ProgressDialog;->dismiss()V

    .line 227
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-static {v2}, Lcom/netease/newsreader/activity/SettingsActivity;->access$1(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/content/SharedPreferences;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    const-string v3, "cover"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 228
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-static {v2}, Lcom/netease/newsreader/activity/SettingsActivity;->access$1(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/content/SharedPreferences;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    const-string v3, "cover_start"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 229
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-static {v2}, Lcom/netease/newsreader/activity/SettingsActivity;->access$1(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/content/SharedPreferences;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    const-string v3, "cover_end"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v2

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 230
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    .line 231
    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-virtual {v3}, Lcom/netease/newsreader/activity/SettingsActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b0077

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 230
    invoke-static {v2, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    .line 231
    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto/16 :goto_0

    .line 234
    .end local v1           #p:Landroid/preference/Preference;
    :pswitch_1
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-static {v2}, Lcom/netease/newsreader/activity/SettingsActivity;->access$0(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/app/ProgressDialog;

    move-result-object v2

    invoke-virtual {v2}, Landroid/app/ProgressDialog;->dismiss()V

    .line 235
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    .line 236
    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    invoke-virtual {v3}, Lcom/netease/newsreader/activity/SettingsActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b0078

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 235
    invoke-static {v2, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    .line 236
    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto/16 :goto_0

    .line 239
    :pswitch_2
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    const-string v3, "cache"

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/activity/SettingsActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    .line 241
    .restart local v1       #p:Landroid/preference/Preference;
    :try_start_0
    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->isSDCardMounted()Z

    move-result v2

    if-nez v2, :cond_1

    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->isSDCardMountedReadOnly()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 242
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity$1;->this$0:Lcom/netease/newsreader/activity/SettingsActivity;

    const v4, 0x7f0b0075

    invoke-virtual {v3, v4}, Lcom/netease/newsreader/activity/SettingsActivity;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, ",\u5f53\u524d\u7f13\u5b58\u5927\u5c0f"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 243
    iget-object v3, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v3

    invoke-static {v3, v4}, Lcom/netease/newsreader/util/FileUtils;->FormetFileSize(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 242
    invoke-virtual {v1, v2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    .line 247
    :catch_0
    move-exception v0

    .line 249
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_0

    .line 216
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
